#ifndef PROCESS_MGR_HPP
#define PROCESS_MGR_HPP



#include "process_executor.hpp"
class ProcessManager
{
public:
    static ProcessManager& getInstance(){
        static ProcessManager instance;
        return instance;
    }
    ProcessManager(ProcessManager&) = delete;
    ProcessManager& operator=(ProcessManager&) = delete;
    bool addProcess(std::string process_name,std::string bin, std::vector<std::string> args = {});

    bool removeProcess(std::string process_name);
    bool removeAllProcess();

    bool startProcess(std::string process_name);
    bool stopProcess(std::string process_name);

    int InspectionApps();

private:
    ProcessManager(){
    }
    ~ProcessManager(){
    }
    bool _startProcess(std::string process_name);
    bool _stopProcess(std::string process_name);

    std::unordered_map <std::string, std::shared_ptr<ProcessExecutor>> process_map_;
};
#endif // PROCESS_MGR_HPP